/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.magri.aula2.exercicio4;

/**
 *
 * @author Magri
 */
public class Polystation implements IAparelhoEletronico {

    private boolean ligado;
    
    public Polystation() {
    }
    
    @Override
    public void ligar() {
        ligado = true;
    }

    @Override
    public void desligar() {
        ligado = false;
    }

    @Override
    public void aumentarVolume() {
        throw new UnsupportedOperationException("Funcao nao suportada.");
    }

    @Override
    public void diminuirVolume() {
        throw new UnsupportedOperationException("Funcao nao suportada.");
    }

    @Override
    public void adiantarCanal() {
        throw new UnsupportedOperationException("Funcao nao suportada.");
    }

    @Override
    public void retrocederCanal() {
        throw new UnsupportedOperationException("Funcao nao suportada.");
    }

    @Override
    public void play() {
        throw new UnsupportedOperationException("ops, TRAVO.");
    }

    @Override
    public void stop() {
        throw new UnsupportedOperationException("Funcao nao suportada.");
    }

    @Override
    public String toString() {
        //return "PolyStation one " + (ligado ? "Ligada" : "Desligada");
        //return "PolyStation 2 " + (ligado ? "Ligada" : "Desligada");
        return "PolyStation 3 " + (ligado ? "Ligado/Travado" : "Desligado");
    }
    
    
}
